const { DataTypes } = require("sequelize");

module.exports = (sequelize) => {
  const LabelDataManagement = sequelize.define(
    "LabelDataManagement",
    {
      id: {
        type: DataTypes.STRING(50),
        primaryKey: true,
        allowNull: false,
      },
      objectId: {
        type: DataTypes.STRING(50),
        field: "object_id", // 自定义字段名
      },
      annotationUserId: {
        type: DataTypes.STRING(50),
        field: "annotation_user_id", // 自定义字段名
      },
      annotationState: {
        type: DataTypes.STRING(50),
        field: "annotation_state", // 自定义字段名
      },
    },
    {
      tableName: "label_data_management", // 自定义表名
      timestamps: true, // 不自动添加 createdAt 和 updatedAt 字段
    }
  );

  return LabelDataManagement;
};
